import { createApp } from 'vue'
import App from '@/App.vue'

const app = createApp(App)

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

app.use(ElementPlus, {
  locale: zhCn
})

//svg插件需要配置代码
import 'virtual:svg-icons-register'
// 引入自定义插件对象：注册整个项目的全局组件
import globalComponent from '@/components'
// 安装自定义插件
app.use(globalComponent)

// 引入模板的全局样式
import '@/styles/index.scss'

//注册路由
import router from './router'
app.use(router)

//引入仓库
import pinia from './store'
app.use(pinia)

//引入路由鉴权文件
import '@/permission'

app.mount('#app')
